// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addSysAnnouncement POST /api/sysAnnouncement/add */
export async function addSysAnnouncementUsingPost(
  body: API.SysAnnouncementAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/sysAnnouncement/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteSysAnnouncement POST /api/sysAnnouncement/delete */
export async function deleteSysAnnouncementUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/sysAnnouncement/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getSysAnnouncementById GET /api/sysAnnouncement/get */
export async function getSysAnnouncementByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysAnnouncementByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseSysAnnouncement_>('/api/sysAnnouncement/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getSysAnnouncementVOById GET /api/sysAnnouncement/get/vo */
export async function getSysAnnouncementVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysAnnouncementVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseSysAnnouncementVO_>('/api/sysAnnouncement/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listSysAnnouncementByPage POST /api/sysAnnouncement/list/page */
export async function listSysAnnouncementByPageUsingPost(
  body: API.SysAnnouncementQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageSysAnnouncement_>('/api/sysAnnouncement/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listSysAnnouncementVOByPage POST /api/sysAnnouncement/list/page/vo */
export async function listSysAnnouncementVoByPageUsingPost(
  body: API.SysAnnouncementQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageSysAnnouncementVO_>('/api/sysAnnouncement/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateSysAnnouncement POST /api/sysAnnouncement/update */
export async function updateSysAnnouncementUsingPost(
  body: API.SysAnnouncementUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/sysAnnouncement/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
